package io.github.lee.app.unsplash.repository.domain

import com.google.gson.annotations.SerializedName

data class UnsplashResponse<T : Any>(
    val code: Int?,
    val msg: String?,
    val data: T? = null
) {
    fun isSuccess(): Boolean = code == 200
}

data class PageResponse<T>(
    @SerializedName("total")
    val total:Int,
    @SerializedName("total_pages")
    val totalPages:Int,
    @SerializedName("results")
    var results:List<T>? = emptyList()
)
